$(function() {
    $('.login-button').click(function() {
        var mobile = $('#mobile').val(),
            password = $("#password").val(),
            reg = /^1[34578]\d{9}$/;
        if (!mobile) {
            promptMsg('请输入您的手机号码');
            return;
        } else if (!reg.test(mobile)) {
            promptMsg('请输入正确格式的手机号码');
            return;
        }
        if (password == null || password == "") {
            promptMsg("请输入设置的密码！");
            return;
        } else if (password.length < 6 || password.length > 10) {
            promptMsg("密码长度在6-10位之间！");
            return;
        }


    })
})

function promptMsg(t) {
    var p = $('.login-prompt');
    p.text(t).css('visibility','visible');
    setTimeout(function() {
        p.css('visibility','hidden');
    }, 3000)
}